
Create Azure DevOps or GitHub bugs from Azure Monitor logs
When operating distributed applications it can be a lot of work if you want to copy error details into tickets and work items for your teams to look at. In this post we're taking a quick look at how we can quickly send specific log entries from Application Insights over to Azure DevOps or GitHub.
When operating distributed applications it can be a lot of work if you want to copy error details into tickets and work items for your teams to look at.
I rely heavily on Azure Monitor and the capabilities to explore exceptions and failures in Application Insights.
There's a fairly new capability that recently released into General Availability, which helps us create work items directly from a logged event in Application Insights.
From Application Insights, select any of your failed events and explore further. When you decide you need to log this as a bug or a work item to your team, you can do that from here:

If you haven't already set up a workbook template, you will get the option to do that now.

From the next view, you can create and define the workbook template. I am calling mine "Production Exceptions", and associating relevant tags that will help in the work item in Azure DevOps.

Create the template, and now you can again click "Create work item" -> "Production Exceptions". The name of the menu item here will be the name you gave it in the previous step.

You now decide whether to log this as a Work Item (task), or as an Exception (bug). Select "Create a bug for this exception".

You'll be redirected to the Azure DevOps (or GitHub) page with all the details you have defined.
In my case, the template will give me this:
- Title: The exception, but I usually modify this manually for each new bug.
- Tags: "WEU", and "ProductionException" as I defined in my template.
- Repro Steps: All the information from Application Insights, including a link back to the very same item in app insights, so anyone picking this up can go back to see the full telemetry (if they are authorized to do so).

That's it. I hope it can help speed up the DevOps and DevSecOps processes you embrace. Because you do embrace them, right?
Recent comments
While JSON doesn't support comments, comments work in that json file. I prefix them with //
Using appsettings.json instead of web.config in .NET Core projects · 4 months ago
Nice one, was helpful :)
Enable thorough monitoring with Azure Monitor for you Azure Kubernetes Services (AKS) cluster · 6 months ago
Hi Tobias, I have noticed that the secure score over time graph does not take into account the last record recorded per...
Track your Azure Secure Score over time · 8 months ago
Pipeline update with the nuget.config worked for me .
Fixing the NuGet 401 Unauthorized issues from private repositories · 8 months ago
(This is an older post I realize) but the Az Powershell module has (as you would expect),
Generate Bicep templates from existing Azure resources with VS Code · 9 months ago
hey, thanks for the gif demo, ur fast as fuck
Developing with Azure Resources - Check out Azure Resource Explorer · 9 months ago